﻿<%@ Page Language="C#" MasterPageFile="~/toolbox.master" AutoEventWireup="true" CodeFile="property.aspx.cs"
    Inherits="property" %>

<asp:Content ID="Header1" ContentPlaceHolderID="HeadPlaceHolder1" runat="server">
    <style type="text/css">
        fieldset
        {
            width: 500px;
        }
        .chkSame{
        border: 1px solid  #999999;
        float:left;
        }
        form fieldset div.notes
        {
            float: right;
            width: 158px;
            height: auto;
            margin: 0 0 10px 10px;
            padding: 5px;
            border: 1px solid #666666;
            background-color: #ffffe1;
            color: #666666;
            font-size: 88%;
        }
        form fieldset legend
        {
            font-size: 150%;
            font-weight: normal;
            color: grey;
            margin: 0 0 0 0;
            padding: 0 5px;
        }
        
        required label
        {
            width:200px;
            text-align:left;
        }
         .disabled
        {
            background-color:#CCCCEE;
            
        }
        .enabled
        {
            background-color:White;
        }
        
        #status_div
        {
            float: right;
        }
        
        div#campaignList
        {
            float:right;
            clear:right;
        }          
            
    </style>
    
   <script language="javascript" type="text/javascript">
       $(document).ready(function () {

           $("input[id$=check_IsPostAddress]").click(function () {
               /*				$('input[id$=txt_PostAddress1]').val();*/
               if (this.checked) {
                   $('input[id$=txt_VendorAddress1]').val($('input[id$=txt_address1]').val()).removeClass("enabled").addClass("disabled").attr("readonly", "readonly");
                   $('input[id$=txt_VendorAddress2]').val($('input[id$=txt_address2]').val()).removeClass("enabled").addClass("disabled").attr("readonly", "readonly");
                   $('input[id$=txt_VendorSuburb]').val($('input[id$=txt_suburb]').val()).removeClass("enabled").addClass("disabled").attr("readonly", "readonly");
                   $('input[id$=txt_VendorPostcode]').val($('input[id$=txt_postcode]').val()).removeClass("enabled").addClass("disabled").attr("readonly", "readonly");
                   $('input[id$=txt_VendorState]').val($('input[id$=txt_state]').val()).removeClass("enabled").addClass("disabled").attr("readonly", "readonly");
               }
               else {
                   $('input[id$=txt_VendorAddress1]').removeClass("disabled").addClass("enabled").removeAttr("readonly");
                   $('input[id$=txt_VendorAddress2]').removeClass("disabled").addClass("enabled").removeAttr("readonly");
                   $('input[id$=txt_VendorSuburb]').removeClass("disabled").addClass("enabled").removeAttr("readonly");
                   $('input[id$=txt_VendorPostcode]').removeClass("disabled").addClass("enabled").removeAttr("readonly");
                   $('input[id$=txt_VendorState]').removeClass("disabled").addClass("enabled").removeAttr("readonly");
               }
           });

           $('input[id$=txt_ScheduleDate]').datepick({ dateFormat: 'dd/mm/yyyy' });
           $('input[id$=txt_ScheduleDate]').datepick();
           //$('input[id$=txt_ScheduleDate]').datepick({onSelect: showDate});

           $('#<%= txtareadDesc.ClientID %>').keyup(function () {
               var len = $('#<%= txtareadDesc.ClientID %>').val().length;

               if (len <= 499) {
                   $("#txtarealength").text(" " + 499 - len + " characters left");
               }
               else {
                   var obj = document.getElementById('<%= txtareadDesc.ClientID %>');
                   obj.value = obj.value.substring(0, 499);
               }
           });

       });
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   
   

<form runat="server" id="form1">
<div class="clear">
</div>
 <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<div class="toptitle" style="padding-top: 5px; float: right; width: 383px; margin-top: 5px;" id="propertydiv" runat="server">
    <div class="change">
        Change the property status: </div>
    
    <div class="floatright">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:DropDownList AutoPostBack="true" ID="dl_campaignStatus" runat="server" 
                    onselectedindexchanged="dl_campaignStatus_SelectedIndexChanged" />
            </ContentTemplate>
        </asp:UpdatePanel>
        
    </div>
</div>
<div class="floorplan_slides">
    <div id="filter">
        <!-- Start: category-->
        <div style="border: 1px solid #333; margin-bottom: 5px;">
            <div class="property_cat">
                <strong>Property Information</strong></div>
            <div class="property_cat01">
                <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="40" colspan="2" class="pdnleft10">
                            <span style="color: #999999;">Please Enter the property information and agent information
                                and press Submit to create a Property.</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Address
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txt_address1" MaxLength="90" CssClass="pro_catfilds"
                                Width="60px" value=""></asp:TextBox>
                            <asp:TextBox runat="server" ID="txt_address2" MaxLength="90" CssClass="pro_catfilds"
                                Width="178px" value=""></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Address1 is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="txt_address1" ></asp:RequiredFieldValidator>
                            <br /><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Address2 is Required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="txt_address2" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Suburb
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txt_suburb" CssClass="pro_catfilds"  MaxLength="50"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Suburb is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="txt_suburb" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Postcode
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txt_postcode" CssClass="pro_catfilds" MaxLength="10" ></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Postcode is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="txt_postcode" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            State
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txt_state" CssClass="pro_catfilds" MaxLength="90"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="State is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="txt_state" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Listing Agent
                        </td>
                        <td>
                            <asp:DropDownList ID="dl_listingAgent" runat='server' CssClass="pro_catfilds" Width="260px">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" InitialValue="0" runat="server" ErrorMessage="Listing Agent is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="dl_listingAgent" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Advertising Agent
                        </td>
                        <td>
                            <asp:DropDownList ID="dl_advertisingAgent" runat='server' CssClass="pro_catfilds"
                                Width="260px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Managing Agent
                        </td>
                        <td>
                            <asp:DropDownList ID="dl_managingAgent" runat='server' CssClass="pro_catfilds" Width="260px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                            Sale Method
                        </td>
                        <td>
                            <asp:DropDownList ID="dl_sale_method" runat='server' CssClass="pro_catfilds" Width="260px">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" InitialValue="0" runat="server" ErrorMessage="Sale Method is required" Display="Dynamic" SetFocusOnError="true" ControlToValidate="dl_sale_method" ></asp:RequiredFieldValidator>
                            <%--<select name="select" id="select" class="pro_catfilds" style="width: 260px;">
                                                <option value="Auction">Auction</option>
                                                <option value="For Sale">For Sale</option>
                                                <option value="Sale by Set Date ">Sale by Set Date </option>
                                                <option value="Other">Other</option>
                                            </select>--%>
                        </td>
                    </tr>
                    <tr>
                        <td class="pdnleft10">
                           Auction Date <img src="images/calender.gif" alt="calender" title="calender"/>
                        </td>
                        <td>
                            <asp:TextBox ID="txt_ScheduleDate" runat="server" CssClass="pro_catfilds"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="32%" class="pdnleft10">
                            Heading
                        </td>
                        <td width="68%">
                            <asp:TextBox ID="txtHeading" runat="server" CssClass="pro_catfilds" MaxLength="50"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" style="vertical-align: top; border-bottom: 0;" class="pdnleft10">
                            Description
                        </td>
                        <td style="border-bottom: 0;">
                            <textarea id="txtareadDesc" runat="server" name="textfield" class="pro_catfilds" style="height: 70px;" ></textarea>
                            <br />
                            <span id="txtarealength" style="text-align: right; padding-right: 10px; color: #999999; float: right;">( max 500 characters)</span>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" height="10">
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <!-- End: category-->
    </div>
    <div class="floorplan_slides">
        <div id="filter">
            <!-- Start: category-->
            <div style="border: 1px solid #333; margin-bottom: 5px;">
                <div class="property_cat">
                    <strong>Vendor Detail</strong></div>
                <div class="property_cat01">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="32%" class="pdnleft10" style="padding-top: 10px;">
                                Same as Property
                            </td>
                            <td width="68%" style="text-align: left; padding-top: 10px;">
                                <asp:CheckBox runat="server" ID="check_IsPostAddress" Checked="false" CssClass="chkSame" />
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Address
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_VendorAddress1" size="10" MaxLength="90" value=""
                                    EnableViewState="false" CssClass="pro_catfilds" Width="60px"></asp:TextBox>
                                <asp:TextBox runat="server" ID="txt_VendorAddress2" size="10" MaxLength="90" value=""
                                    CssClass="pro_catfilds" Width="178px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Suburb
                            </td>
                            <td>
                                <asp:TextBox ID="txt_VendorSuburb" runat="server" size="10" MaxLength="50" CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Postcode
                            </td>
                            <td>
                                <asp:TextBox ID="txt_VendorPostcode" runat="server" size="10" MaxLength="10" CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                State
                            </td>
                            <td>
                                <asp:TextBox ID="txt_VendorState" runat="server" size="10" MaxLength="90" CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Family Name
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_FamilyName" size="10" MaxLength="90" value=""
                                    CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Given Name
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_GivenName" size="10" MaxLength="90" value=""
                                    CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Email
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_Email" size="10" MaxLength="90" value="" CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Contact Number
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_ContactNumber" size="10" MaxLength="20" CssClass="pro_catfilds"
                                    value=""></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="pdnleft10">
                                Mobile Number
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txt_Mobile" size="10" MaxLength="20" value="" CssClass="pro_catfilds"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" height="10">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <!-- End: category-->
        </div>
    </div>
    <div class="floorplan_slides">
        <%--<asp:Button ID="switchButton" Text="Mdoify" runat="server" OnClick="Switch_Mode_Click" />
                        <asp:Button ID="addProperty" runat="server" Text="Submit" OnClick="Button1_Click" />
                        <asp:Button ID="bt_ShoppingCart" runat="server" Text="Manage Campaigns" OnClick="goToList_Click" />--%>
        <asp:ImageButton ID="switchButton" CausesValidation="false" runat="server" ImageUrl="images/modify.jpg"
            OnClick="switchButton_Click" />
        <asp:ImageButton ID="addProperty" runat="server" ImageUrl="images/submit.jpg" OnClick="addProperty_Click" />
        <asp:ImageButton CausesValidation="false" ID="bt_ShoppingCart" runat="server" ImageUrl="images/manage_campaigns.jpg"
            OnClick="bt_ShoppingCart_Click" Visible="false" />
    </div>
</div>
<div class="floorplan" style="margin-right: 0;" id="campaignslist" runat="server">
    <div class="floorplanin pro_cat01 td">
        <asp:PlaceHolder ID="ph_Campaigns" runat="server"></asp:PlaceHolder>
    </div>
</div>
<blockquote>
    &nbsp;</blockquote>
<asp:HiddenField ID="hd_PropertyID" runat="server" Value="" />
<div class="clear">
</div>
</form>

</asp:Content>
